package com.seveneight.baijiesteward.ui.user.presenter;

import android.content.Context;

import com.seveneight.baijiesteward.bean.AnyBean;
import com.seveneight.baijiesteward.bean.BankBean;
import com.seveneight.baijiesteward.http.MyCallBack;
import com.seveneight.baijiesteward.ui.user.contract.GetBankListContract;
import com.seveneight.baijiesteward.ui.user.model.GetBankListModel;

import java.util.List;

import okhttp3.RequestBody;

/**
 * Created by user1 on 2018/3/17.
 */

public class GetBankListPresenter implements GetBankListContract.GetBankPresenter {

    GetBankListContract.GetBankView getBankView;
    GetBankListContract.GetBankModel getBankModel;

    public GetBankListPresenter(GetBankListContract.GetBankView getBankView){
        this.getBankView=getBankView;
        getBankModel=new GetBankListModel();
    }

    @Override
    public void getBankList(Context context, RequestBody body) {
        getBankModel.getBankList(context,body, new MyCallBack<List<BankBean>>() {
            @Override
            public void onSuccess(List<BankBean> data) {
                getBankView.rebackBankList(data);
            }

            @Override
            public void onFailed() {

            }
        });
    }
}
